The under-assessment of pain response is one of the primary barriers to the adequate treatment of pain in critically ill patients, and is associated with many negative outcomes. Nonetheless, many ICU patients are unable to self-report their pain intensity. Currently, behavioral pain scales are used to assess pain in nonverbal patients. Unfortunately, these scales require repetitive manual administration by overburdened nurses, and show variability in pain intensity ratings by nurses. Furthermore, manual pain assessment tools cannot monitor pain continuously and autonomously. The PIs? long-term goal is to specify pain intensity in an autonomous and precise manner. The overall objective of this application is to build the foundation of an autonomous, clinically- available pain assessment system by developing and validating pain recognition algorithms in a fully uncontrolled ICU setting. The central hypothesis is we can autonomously assess facial pain expressions and patient activity. The rationale is that autonomous pain quantification can reduce nurse workload and can enable real-time pain monitoring. Contextualization of pain with respect to patient function can also lead to improved functional and clinical outcomes. The overall objective will be achieved by pursuing two specific aims. (1) Developing and validating a pervasive sensing system in two 24-beds ICUs (ICU) to determine if deep learning algorithms can accurately assess pain facial expressions from image data, when compared to existing assessment tools. (2) Developing and validating algorithms for pain contextualization using autonomous activity recognition. The approach is innovative, because it departs from status quo by autonomously assessing pain and functional status in the ICU. The proposed research is significant since it will address several key problems and barriers in critical care, including manual repetitive ICU assessments and lack of granular and continuous pain and function measures. Ultimately, the results are expected to improve patient outcomes and decrease hospitalization costs, as well as lifelong complications.